HopeTIME / [timerd] 腾讯、爱奇艺、芒果、优酷、乐视、B站、土豆、搜狐、暴风、1905等 VIP视频免费看(2019-06-23)更新

// ==UserScript==
// @name         [timerd] 腾讯、爱奇艺、芒果、优酷、乐视、B站、土豆、搜狐、暴风、1905等 VIP视频免费看(2019-06-23)更新
// @namespace    http://timerd.ml
// @version      0.15
// @description  腾讯、爱奇艺、芒果、优酷、乐视、B站、土豆、搜狐、暴风、1905等各大视频网站视频解析服务, 没有广告!
// @author       timerd
// @include      *://v.youku.com/v_*
// @include      *://m.youku.com/v*
// @include      *://m.youku.com/a*
// @include      *://*.iqiyi.com/v_*
// @include      *://*.iqiyi.com/w_*
// @include      *://*.iqiyi.com/a_*
// @include      *://*.iqiyi.com/dianying/*
// @include      *://*.le.com/ptv/vplay/*
// @include      *://*v.qq.com/x/cover/*
// @include      *://*v.qq.com/x/page/*
// @include      *://*v.qq.com/play*
// @include      *://*v.qq.com/cover*
// @include      *://*.tudou.com/listplay/*
// @include      *://*.tudou.com/albumplay/*
// @include      *://*.tudou.com/programs/view/*
// @include      *://*.tudou.com/v*
// @include      *://*.mgtv.com/b/*
// @include      *://film.sohu.com/album/*
// @include      *://tv.sohu.com/*
// @include      *://*.bilibili.com/video/*
// @include      *://*.bilibili.com/anime/*
// @include      *://*.bilibili.com/bangumi/play/*
// @include      *://*.pptv.com/show/*
// @include      *://*.baofeng.com/play/*
// @include      *://*.wasu.cn/Play/show*
// @include      *://*.1905.com/play/*
// @require      http://cdn.bootcss.com/jquery/1.12.4/jquery.min.js
// @grant        GM_openInTab
// @grant        GM_setValue
// @grant        GM_getValue
// @grant        GM_xmlhttpRequest
// @grant        GM_addStyle
// @grant        unsafeWindow
// @grant        GM_getResourceURL
// @grant        GM_getResourceText
// @license MIT
// ==/UserScript==
(function () {

    // Define region
    //-------------------------------------------------------------
    function sleep(d) {
        for (var t = Date.now(); Date.now() - t <= d;);
    }
    
    function addInfrastructure(isMQQ) {
        var style = document.createElement("style");
    
        if (isMQQ) {
    
            style.appendChild(document.createTextNode(`
        #mywidget a {
            position: absolute;
            left: -80px;
            transition: 0.3s;
            padding: 15px 15px;  
            text-decoration: none;
            color: white!important;
            border-radius: 0 5px 5px 0;
            font: 20px "Microsoft YaHei",SimHei,helvetica,arial,verdana,tahoma,sans-serif;
            height: 60px!important;
            width: 130px!important;
           
          }`));
        }
        else {
    
            style.appendChild(document.createTextNode(`
            #mywidget a {
              position: absolute;
              left: -80px;
              transition: 0.3s;
              padding: 15px;  
              text-decoration: none;
              color: white!important;
              border-radius: 0 5px 5px 0;
              font: 20px "Microsoft YaHei",SimHei,helvetica,arial,verdana,tahoma,sans-serif;
              height: 38px;
              width: 100px;
             
            }`));
    
        }
    
        style.appendChild(document.createTextNode(`
    
    #mywidget a:hover {
      left: 0;
    }
    
    
    #vparse {
      background-color: #f44336;
    }
    
    #mywidget a img {
    width: 28px;
    height:34px;
    position: absolute;
    top:16px;
    right: 5px;
    align-items: center;
    }
    `));
        document.head.appendChild(style);
    }
    


    //-------------------------------------------------------------

    var playurl = window.location.href;
    var arr = new Array();
    arr = playurl.split('?')
    var getUrl = arr[0];
    window["alert"] = function (e) { };
    if (getUrl.indexOf('chinese-elements.com') == -1) {

        if (getUrl.indexOf('m1907.cn') != -1) {
            window["alert"] = function (e) {

            };
            sleep(3000);
            return;
        }
        addInfrastructure(getUrl.indexOf('m.v.qq.com') != -1);
        var websites = new Array()
        websites[0] = "youku.com";
        websites[1] = "iqiyi.com";
        websites[2] = "le.com";
        websites[3] = "qq.com";
        websites[4] = "tudou.com";
        websites[5] = "mgtv.com";
        websites[6] = "sohu.com";
        websites[7] = "1905.com";
        websites[8] = "bilibili.com";
        websites[9] = "pptv.com";
        websites[10] = "baofeng.com";
        websites[11] = "yinyuetai.com";
        websites[12] = "wasu.cn";

        for (var n = 0; n < websites.length; n++) {
            if (getUrl.indexOf(websites[n]) != -1) {
                var playbutton = $(`
<div id="mywidget" href='javascript:void(0)' target='_blank' style="z-index:9999; position:fixed;left:0px;top:280px;">    
    <a href="#" id="vparse">视频解析<img  src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIoAAAEABAMAAACe9fNdAAAAAXNSR0IB2cksfwAAAAlwSFlzAAALEwAACxMBAJqcGAAAACpQTFRFAAAA/////////////////////////////////v7+////////////////f9kpNAAAAA50Uk5TAFBv/5+AkGAgt69woLCQiK2eAAADi0lEQVR4nM3WzXEaYRCEYXRyAEpAObAXlVGVc1AICsVh+OYIFMIXmkEI2P12frp75mACeOptCmb3cHh6OTR8npcO5f34q0XpiHk/dsSclYaYs9IQc1HqMRelHvNxbIj5cTw2xPy+KsWY75ZqzEdLzHtLzE15felQapvuSmnTQ6nEPJRKzEopxKyUQsxa0WPWih6zUeSYjSLHbBU1ZquoMZMixkyKGDMrWsysaDE7RYrZKVLMXlFi9ooSYyjCITcUYZOl8JtMhY4xFTrGVtgYW2FjHIWMcRQyxlO4GE/hYlyFinEVKsZXmBhfYWIChYgJFCImUvCYSMFjQgWOCRU4JlbQmFhBYxIFfKokCrgpU7BNqQLFpAoUkytITK4gMYACxAAKEIMoeQyi5DGQksZAShqDKVkMpmQxoJLEgEoSgypxDKrEMbASxsBKGIMr0SHHlWgToQSbGMWPYRQ/hlLcGEpxYzjFi+EUL4ZUnBhScWJYxY5hFTuGVswYWjFjeMWK4RUrRlCMGEExYhRlH6Mox78tym6TpsybNGWOEZWlRZliVGVpUbYxsrK0KJsYXVlalHVMQVlalFVMRVlalEdMSVlalHtMTVlalFtMUVlalO+YqnJ9I68q101l5WtTXVlalEtMg/LzP1JGh3Jq+XZHh3Jq+dWNDuXU8W98++xQRsd9ObVczNGh3FJqyuhQ7iklZXQoj5SKMjqUVUpBGR3KOkVXRoeySZGV0aFsU1RldChTiqiMDmVOkZTXzw5l3iMpuz2Ssk8RFCNFUIwUXrFSeMVKoRUzhVbMFFaxU1jFTiEVJ4VUnBRO8VI4xUuhFDeFUtwURvFTGMVPIZQgBVf2J1tRgj24Eu3BlTAFVeIUVIlTQCVJAZUkBVOyFEzJUiAlTYGUNAVR8hREyVMABUgBFCAlV5CUXEFSUgVKSRUoJVOwlEzBUhIFTImV8OkBK+CeWEH3xAqcEil4SqTgKYFCpAQKkeIrTIqvMCmuQqW4CpXiKVyKp3ApjkKmOAqZYitsiq2wKaZCp5gKnWIpfIqhvKEnO1QGj+wVYY+hKCk7RUrZKVLKrGgps6KlTIqYMiliylZRU7aKmrJR5JSNIqesFT1lregpK6WQslIKKQ+lkvJQKil35U8FuSmlPXdldCjFlG+lmHJVqilXpZrypZRTvpRyykWpp1yUespZaUg5K6NBee5IOTwJb07z5x8vsz6yIYOSJgAAAABJRU5ErkJggg=="></img>  </a>
</div>
`);
                playbutton.hide();
                $("body").append(playbutton);
                playbutton.show();
                break;
            }
        }
        $("#mywidget").click(function () {
            var loc = window.location.href;
            window.open('https://chinese-elements.com/static/v.html?zwx=' + loc);
        });
    }
})();